{extend name="/layouts/auth" /}

{block name="content"}
<div id="login" class="row justify-content-center">
    <div class="col-xxl-4 col-lg-5">
        <div class="card">
            
            <!-- Logo - 开始 -->
            <div class="card-header pt-4 pb-4 text-center bg-primary">
                <a href="/">
                    <span><img src="{$CONFIG->ROOT}images/logo.png" height="30"></span>
                </a>
            </div>
            <!-- Logo - 结束 -->
            
            <div class="card-body p-4">
                
                <div class="text-center w-80 m-auto">
                    <h4 class="text-dark-50 text-center mt-0 font-weight-bold">登录</h4>
                    <p class="text-muted mb-4">请输入帐号密码进行登录！</p>
                </div>
                
                <div class="form-group">
                    <label class="form-label">帐号：</label>
                    <input class="form-control" type="text" name="account" v-model="account" placeholder="帐号 | 邮箱">
                </div>
                
                <div class="form-group mb-1">
                    <!--<a href="reset.html" class="text-muted float-right"><small>找回密码</small></a>-->
                    <label class="form-label">密码：</label>
                    <input v-on:keyup.enter="btnLogin()" class="form-control" type="password" v-model="password" placeholder>
                </div>
                
                <div class="form-group mb-3 pb-2">
                    <div class="custom-control custom-checkbox pl-0">
                        <label v-if="false">找回密码</label>
                        <span class="float-end">
                            <a href="register.html" class="text-muted"><strong>注册帐号</strong></a>
                        </span>
                    </div>
                </div>
                
                <div class="form-group w-100 flex-center">
                    <button type="button" class="btn btn-block btn-primary" v-on:click="btnLogin()">
                        <div v-if="is_login" class="spinner-border text-light mr-1" role="status"></div>
                        {{ (is_login) ? '登录中 ...' : '登&nbsp;&nbsp;录' }}
                    </button>
                </div>
                
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="{$CONFIG->ROOT}js/pages/login.js?v={$CONFIG->VERSION}"></script>
{/block}